From: Brion Vibber Date: Wed, 27 Jun 2007 20:51:41 +0000 (+0000) Subject: Fix regression -- wfMkdirParents() started whining if target directory existed, inste... X-Git-Tag: 1.31.0-rc.0~52366 X-Git-Url: http://git.cyclocoop.org/%22.%24match%5B1%5D.%22?a=commitdiff_plain;h=b3813f456ae59456f42b509ab1aa263e3edddee8;p=lhc%2Fweb%2Fwiklou.git Fix regression -- wfMkdirParents() started whining if target directory existed, instead of just giving the thumbs-up --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index d1aac27c8d..a3a7657242 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1665,6 +1665,8 @@ function wfTempDir() { function wfMkdirParents( $fullDir, $mode = 0777 ) { if( strval( $fullDir ) === '' ) return true; + if( file_exists( $fullDir ) ) + return true; return mkdir( $fullDir, $mode, true ); }